package com.graduationproject.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * @author shkstart
 * @create 2023-12-19-14:05
 */
@Data
@Schema(description = "用户信息")
public class User {

    @TableId(type = IdType.AUTO)
    @Schema(description = "主键id")
    private  Integer  id;

    @Schema(description = "用户用户名")
    private String username;

    @Schema(description = "用户密码")
    private  String password;

    @Schema(description = "角色")
    @TableField(exist = false)
    private  String role;

    @Schema(description = "角色列表")
    @TableField(exist = false)
    private  List<Role> roles;

    @Schema(description = "token")
    @TableField(exist = false)
    private  String token;

    @Schema(description = "用户身高")
    private  String height;

    @Schema(description = "用户体重")
    private  String weight;

    @Schema(description = "用户手机号码")
    private  String tel;

    @Schema(description = "用户登录状态")
    private  String status;

    @Schema(description = "用户性别")
    private  String gender;

    @Schema(description = "所需能量")
    @TableField(exist = false)
    private String energy;

    @Schema(description = "劳动等级")
    private  String labor;

    @Schema(description = "年龄")
    private String years;

    @Schema(description = "用户权限")
    @TableField(exist = false)
    private List<Permissions> permission;

    @Schema(description = "逻辑删除（0-未删除  1-已删除）")
    @TableLogic
    private Integer delFlag;
}
